home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRMMMMTTTT((((1111MMMM)))) RRRRMMMMTTTT((((1111MMMM))))
-
-
-
- NNNNAAAAMMMMEEEE
- rmt - remote magtape protocol module
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ////eeeettttcccc////rrrrmmmmtttt
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _R_m_t is a program used by the remote programs in manipulating a magnetic
- tape drive through an interprocess communication connection. _R_m_t is
- normally started up with an _r_e_x_e_c(3N) or _r_c_m_d(3N) call.
-
- The _r_m_t program accepts requests specific to the manipulation of magnetic
- tapes, performs the commands, then responds with a status indication.
- All responses are in ASCII and in one of two forms. Successful commands
- have responses of:
-
- AAAA_n_u_m_b_e_r\n
-
- where _n_u_m_b_e_r is an ASCII representation of a decimal number.
- Unsuccessful commands are responded to with:
-
- EEEE_e_r_r_o_r-_n_u_m_b_e_r\n_e_r_r_o_r-_m_e_s_s_a_g_e\n
-
- where _e_r_r_o_r-_n_u_m_b_e_r is one of the possible error numbers described in
- _i_n_t_r_o(2), and _e_r_r_o_r-_m_e_s_s_a_g_e is the corresponding error string as printed
- from a call to _p_e_r_r_o_r(3). The protocol is comprised of the following
- commands (a space is present between each token):
-
- OOOOddddeeeevvvviiiicccceeee\\\\nnnnmmmmooooddddeeee\\\\nnnn
- Open the specified _d_e_v_i_c_e using the indicated _m_o_d_e.
- _D_e_v_i_c_e is a full pathname and _m_o_d_e is an ASCII
- representation of a decimal number suitable for passing to
- _o_p_e_n(2). If a device had already been opened, it is
- closed before a new open is performed.
-
- VVVVvvvveeeerrrrssssiiiioooonnnn####\\\\nnnn This command is sent by the client program to indicate the
- _v_e_r_s_i_o_n# of the 'librmt' library that the client program
- is linked with. If rrrrmmmmtttt own protocol is the same or more
- advanced than that of the client program, rrrrmmmmtttt will adjust
- to the client program protocol and return the client
- _v_e_r_s_i_o_n# . However, if the client program _v_e_r_s_i_o_n# is more
- advanced than rrrrmmmmtttt own protocol version number then rrrrmmmmtttt
- will return its actual version number and expect the
- client program to adjust to rrrrmmmmtttt protocol. The returned
- value is the ASCII representation of the version number.
-
- CCCCddddeeeevvvviiiicccceeee\\\\nnnn Close the currently open device. The _d_e_v_i_c_e specified is
- ignored.
-
- LLLLwwwwhhhheeeennnncccceeee\\\\nnnnooooffffffffsssseeeetttt\\\\nnnn
- Perform an _l_s_e_e_k(2) operation using the specified
- parameters. The response value is that returned from the
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRMMMMTTTT((((1111MMMM)))) RRRRMMMMTTTT((((1111MMMM))))
-
-
-
- _l_s_e_e_k call.
-
- WWWWccccoooouuuunnnntttt\\\\nnnn Write data onto the open device. _R_m_t reads _c_o_u_n_t bytes
- from the connection, aborting if a premature end-of-file
- is encountered. The response value is that returned from
- the _w_r_i_t_e(2) call.
-
- RRRRccccoooouuuunnnntttt\\\\nnnn Read _c_o_u_n_t bytes of data from the open device. If _c_o_u_n_t
- exceeds the size of the data buffer (10 kilobytes), it is
- truncated to the data buffer size. _R_m_t then performs the
- requested _r_e_a_d(2) and responds with AAAA_c_o_u_n_t-_r_e_a_d\n if the
- read was successful; otherwise an error in the standard
- format is returned. If the read was successful, the data
- read is then sent.
-
- IIIIooooppppeeeerrrraaaattttiiiioooonnnn\\\\nnnnccccoooouuuunnnntttt\\\\nnnn
- Perform a MTIOTOP _i_o_c_t_l(2) command using the specified
- parameters. The parameters are interpreted as the ASCII
- representations of the decimal values to place in the
- _m_t__o_p and _m_t__c_o_u_n_t fields of the structure used in the
- _i_o_c_t_l call. The return value is the _c_o_u_n_t parameter when
- the operation is successful.
-
- SSSS\\\\nnnn Return the status of the open device, as obtained with a
- MTIOCGET _i_o_c_t_l call. If the operation was successful, an
- ``ack'' is sent with the size of the status buffer, then
- the status buffer is sent (in binary).
-
- QQQQ\\\\nnnn Perform a MTSCSIINQ _i_o_c_t_l(2) command. If the operation was
- successful, an ``ack'' is sent with the size of the
- inquiry buffer, then the inquiry buffer is sent (in
- binary).
-
- BBBB\\\\nnnn Perform a MTIOCGETBLKSIZE _i_o_c_t_l(2) command. If the
- operation was successful, an ``ack'' is sent with the size
- of the block size buffer, then the block size buffer is
- sent (in binary).
-
- ZZZZ\\\\nnnn Perform a _f_s_t_a_t(2) system call on the currently opened
- device. If the operation was successful, an ``ack'' is
- sent with the size of the ``stat'' structure, then the
- actual ``stat'' structure is sent (in binary).
-
- Any other command causes _r_m_t to exit.
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- All responses are of the form described above. If rrrrmmmmtttt is invoked with an
- argument, that argument will be treated as a file name and debug
- information will be logged in that file.
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- RRRRMMMMTTTT((((1111MMMM)))) RRRRMMMMTTTT((((1111MMMM))))
-
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- rcmd(3N), rexec(3N), mtio(7),
-
- BBBBUUUUGGGGSSSS
- People tempted to use this for a remote file access protocol are
- discouraged.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-